<!-- 申请人 -->
<template>
  <a-space direction="vertical" style="width: 100%">
    <a-input
      v-model="BuyName"
      :placeholder="props.props.placeholder"
      disabled
    />
  </a-space>
</template>

<script lang="ts" setup>
  import { ref, computed, watch, onMounted } from 'vue';
  import miiter from '@/utils/mitt';

  const props = withDefaults(
    defineProps<{
      props: { [propName: string]: any };
      name?: string;
      required?: boolean;
      oneValue: any;
      regex?: {
        [name: string]: {
          role: any;
          name: any;
        };
      };
    }>(),
    {}
  );

  const userId = ref();
  let userData = JSON.parse(sessionStorage.getItem('loginInfo'));
  const BuyName = ref('');

  const emit = defineEmits(['update:oneValue']);

  const form = computed({
    get() {
      return props.oneValue;
    },
    set(val) {
      emit('update:oneValue', val);
    },
  });

  onMounted(() => {
    if (form.value) {
      BuyName.value = userData.name;
    }
  });
</script>

<style scoped lang="less"></style>
